<template>
    <div class="items">
        <div class="achieves">
            <div class="achieveitem" v-for="(item, index) in achieveitem">
                <div v-if="index!=0&index!=5">
                    <img :src="`${config.imgTarget}/reward/${index}.png`" alt="">
                    <div class="times">{{ item.times }}个</div>
                </div>
            </div>
        </div>
    </div>
</template>
<script setup>
import config from '../../config/config.js'

import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router';
import api from '../../api/user';
const router = useRouter();
const achieveitem = ref();
onMounted(() => {
    api.getachieve()
        .then((res) => {

            achieveitem.value = res.data;
            console.log(achieveitem.value);
        })
})
</script>
<style lang="scss" scoped>
.items {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('@/static/back.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    gap: 2rem;
    overflow: hidden;
    overflow-y: auto;
    padding: 3rem;

    .achieves {
        height: 80%;
        width: 80%;
        display: flex;
        align-items: center;
        gap: 2rem;
        // justify-content: center;
        overflow-x: auto;

        .achieveitem {
            width: 30rem;
            height: 30rem;

            img {
                width: 20rem;
                height: 20rem;

            }

            .times {
                font-size: 5rem;
                font-weight: 700;
                color: red;
            }
        }
    }

}
</style>